import {reqSearch} from '@/api/'

export default {
    state(){
        return{
            searchs:{}
        }
    },
    getter:{
         
    },
    mutations:{
        GETSEARCH(state,data){
            state.searchs=data
        }
    },
     actions:{
        async getSearch(context,data={}){
            try{
           
              const searchs =  await reqSearch(data)
              if(searchs.code===200){
                  context.commit("GETSEARCH",searchs.data)
              }
            }catch(error){
                console.log(error);
            }
        }
    }
}